1. Field of the Invention
The present invention relates to systems and methods for transferring data structures in remote procedure calls (RPCs).
2. Description of the Related Art
XML is an ASCII-based language that allows data structures to be exchanged between, e.g., a Web server and a client computer via the Internet. XML allows for the transfer of nested frames of key/value pairs. Typically, in XML, when a client computer wishes to make a procedure call on a remote machine, it generates a request, which must be translated to ASCII-based XML. The request/query is then transmitted to, e.g. a service such as a Web server, which must first parse the ASCII to ensure a recognizable XML request has been received, before processing the query to see what it contains.
Further, when an XML document is transferred with a DTD, the DTD specifies the various data types in the document, but not the size of any values contained in the document. This means that a computer receiving an XML document does not know, prior to completing the parsing process, how large a space it must reserve for the document. Consequently, the present invention understands that computing is rendered relatively more inefficient, since the receiving computer generally compensates for the lack of knowledge of size by initially allocating more space than is usually necessary.
As recognized herein, the representation of XML is ASCII (or unicode), which is an underlying representation that is much more powerful than what is needed for XML. As further recognized herein, this gives rise to the possibility of transmitting documents that may be valid ASCII documents (which are universally recognized) that might not otherwise be valid XML documents (which are not universally recognized absent, e.g., JAVA capability on both the receiving computer and transmitting computer, or C capability on both, and so on). In turn, exploiting the above recognition enables the use of a robust transfer protocol that, while not completely unrestrained, is platform independent and computationally efficient.
A general purpose computer is programmed according to the inventive steps herein to execute the logic of the present invention. The invention can also be embodied as an article of manufacturexe2x80x94a machine componentxe2x80x94that is used by a digital processing apparatus and which tangibly embodies a program of instructions that are executable by the digital processing apparatus to execute the present logic. This invention is realized in a critical machine component that causes a digital processing apparatus to perform the inventive method steps herein.
Accordingly, a general purpose receiving computer includes logic for accessing at least one data tree, and generating a message including plural elements. Each element is a node element representative of a respective node of the tree or a leaf element representative of a respective leaf of the tree. Each node element has an associated size value indicating a number of leaves or nodes depending from the respective node, whereas each leaf element has an associated size value indicating a size of a value in the respective leaf. The computer transfers the message from the transmitting computer to the receiving computer to establish, e.g., a remote procedure call (RPC) over the Internet.
In a preferred embodiment, each element further includes a name that is representative of the respective node, as well as a name size preceding the name. As set forth in greater detail below, the name size indicates the size of the associated name. Still further, each preferred element includes one of only two data types, node and leaf, and each leaf element further includes a value representing a value of the associated leaf. The logic is accomplished by a depth first traversal of the tree.
In another aspect, a computer-implemented data transfer protocol includes traversing a data tree and generating transfer elements representing nodes and leaves in the tree. Each transfer element includes at least one size value. The transfer elements are transmitted to effect at least one remote procedure call (RPC).
In still another aspect, a computer program device includes a computer program storage device that can be read by a digital processing apparatus. A program is on the program storage device. and the program includes instructions that are executable by the digital processing apparatus for performing method acts for transferring data representative of a tree structure over a wide area computer network. The program includes logic means for generating a platform independent message representing a data tree and a size of at least one characteristic of the data tree. The message also carries information pertaining to the structure of the tree.
The details of the present invention, both as to its structure and operation, can best be understood in reference to the accompanying drawings, in which like reference numerals refer to like parts, and in which: